M      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Safe# None&?Apply a filter to the version numbers of the changelog entries.-Filter out versions newer than the given one.*Find the log entry with the given version.None0;=>?A0 An exampleA class of Bs insterspersed with Cs. It is used when converting the cabal dependencies to debian, where the "around" type is the binary package name and the "between" type is the version number.Minimum implementation is a method to return the leftmost B, and another to return the following (C,B) pairs. Its unfortunate to require lists in the implementation, a fold function would be better (though I find implementing such folds to be a pain in the you-know-what.)oThe class provides implementations of three folds, each of which exposes slightly different views of the data.    None01;=1NNone1;=>?BDescribes a mapping from cabal package name and version to debian package names. For example, versions of the cabal QuickCheck package less than 2 are mapped to "quickcheck1", while version 2 or greater is mapped to "quickcheck2".>The Debian name given to versions older than the oldest split.Each pair is The version where the split occurs, and the name to use for versions greater than or equal to that version. This list assumed to be in (must be kept in) descending version number order, newest to oldest`The base of a debian binary package name, the string that appears between "libghc-" and "-dev".fCreate a version split database that assigns a single debian package name base to all cabal versions.?Split the version range and give the older packages a new name.ABrute force implementation - I'm assuming this is not a huge map.Given a version split database, turn the debian version requirements into a debian package name base that ought to satisfy them. Where to split the version range1The name to use for versions older than the splitNone;<=QVRO *>Read and parse the status file for installed debian packages: varlibdpkgstatus/YWrite a file which we might still be reading from in order to compute the text argument.0PCompute the new file contents from the old. If f returns Nothing do not write.3Create a map from pathname to the names of the packages that contains that pathname using the contents of the debian package info directory varlibdpkginfo.4:Given a path, return the name of the package that owns it.:EFrom Darcs.Utils - set the working directory and run an IO operation.;'Get directory contents minus dot files.?=If the current value of view x is Nothing, replace it with f.D Version of ? that first clamps its argument to the acceptable range (0-3).ISet b if it currently isNothing and the argument isJust, that is 1. Nothing happens if the argument isNothing 2. Nothing happens if the current value isJustJ0This should probably be used in a lot of places.h    ()*+,-./0123456789:;<=>?@ABCDEFGHIJ#)(*+,-./0123456789:;<=>?@ABCDEFGHIJNone1nM+A redundant data type, too lazy to expunge.S%The output of the debootstrap commandT0An environment with build dependencies installedU,An environment where we have built a packageVnThis record supplies enough information to locate and load a debianization or a cabal file from the IO monad.X=Run with progress messages at the given level of verboseness.YYDon't write any files or create any directories, just explain what would have been done.ZCarefully upgrade the packaging[INormalize a debianization (field order, whitespace) by round-tripping it.\RFail if the debianization already present doesn't match the one we are going to generate closely enough that it is safe to debianize during the run of dpkg-buildpackage, when Setup configure is run. Specifically, the version number in the top changelog entry must match, and the sets of package names in the control file must match.]Which compiler should we generate library packages for? In theory a single deb could handle multiple compiler flavors, but the support tools are not ready for this as of right now (28 Jan 2015.)^Flags to pass to Cabal function finalizePackageDescription, this can be used to control the flags in the cabal file. It can be supplied to the cabal-debian binary using the --flags option._ Directory containing the build environment for which the debianization will be generated. This determines which compiler will be available, which in turn determines which basic libraries can be provided by the compiler. By default all the paths in EnvSet are "/".uWCommand line options which build a function that modifies a state monad value of type VMOPNQRUTSVWXYZ[\]^_mnopqrstuVWXYZ[\]^_QRSTUMNOPtprqsonmuMNOPQRSTUV WXYZ[\]^_None1;=e,v/Official Debian license types as described in  Xhttps://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-specification.w^No license required for any purpose; the work is not subject to copyright in any jurisdiction.xApache license 1.0, 2.0.yArtistic license 1.0, 2.0.z9Berkeley software distribution license, 2-clause version.{9Berkeley software distribution license, 3-clause version.|9Berkeley software distribution license, 4-clause version.}JInternet Software Consortium, sometimes also known as the OpenBSD License.~8Creative Commons Attribution license 1.0, 2.0, 2.5, 3.0.DCreative Commons Attribution Share Alike license 1.0, 2.0, 2.5, 3.0.GCreative Commons Attribution No Derivatives license 1.0, 2.0, 2.5, 3.0.GCreative Commons Attribution Non-Commercial license 1.0, 2.0, 2.5, 3.0.SCreative Commons Attribution Non-Commercial Share Alike license 1.0, 2.0, 2.5, 3.0.VCreative Commons Attribution Non-Commercial No Derivatives license 1.0, 2.0, 2.5, 3.0.*Creative Commons Zero 1.0 Universal. Omit  Universal6 from the license version when forming the short name.0Common Development and Distribution License 1.0.IBM Common Public License."The Eiffel Forum License 1.0, 2.0.The Expat license.)GNU General Public License 1.0, 2.0, 3.0.VGNU Lesser General Public License 2.1, 3.0, or GNU Library General Public License 2.0.GNU Free Documentation License 1.0, 1.1, 1.2, or 1.3. Use GFDL-NIV instead if there are no Front-Cover or Back-Cover Texts or Invariant Sections.GNU Free Documentation License, with no Front-Cover or Back-Cover Texts or Invariant Sections. Use the same version numbers as GFDL.1LaTeX Project Public License 1.0, 1.1, 1.2, 1.3c.Mozilla Public License 1.1.0erl license (use "GPL-1+ or Artistic-1" instead)Python license 2.0.Q Public License 1.0.SW3C Software License For more information, consult the W3C Intellectual Rights FAQ.zlib/libpng license.'Zope Public License 1.0, 1.1, 2.0, 2.1.Any other license name6The architectures for which a binary deb can be built.(The package is architecture independenct-The package can be built for any architecture"The list of suitable architecturesThe version number of the installed debhelper package is the highest acceptable value for compat in a debian/control file. If the package doesn't explicitly set an (acceptable) compat value we can use the value returned by this function, assuming debhelper is installed."Assumes debian-policy is installedTTurn the uploaders field of a cabal package into a list of RFC2822 NameAddr values.2Parse a string containing a single NameAddr value.TMaintainer is a mandatory field, so we need a value we can use when all else fails.hConvert the Cabal license to a Debian license. I would welcome input on how to make this more correct.XConvert a Debian license to a Cabal license. Additional cases and corrections welcome.3I think we need an actual parser for license names.Wv}xwyz{|~Wvwxyz{|}~vwxyz{|}~ None 1;=NV]Description of the machine readable debian/copyright file. A special case is used to represeent the old style free format file - if the value is equal to newCopyrightDescription except for the field _summaryComment, the text in _summaryComment is the copyright file.Read a ( from the text one might obtain from a debian/copyright file.(Try to parse a structured copyright fileInfer a  from a Cabal package description. This will try to read any copyright files listed in the cabal configuration. Inputs include the license field from the cabal file, the contents of the license files mentioned there, and the provided  copyright0 value. $Replace empty lines with single dots*      !"#$%&'()*+,-.*      %$&!#",)*+(-.'        None1;=0&Package interrelationship information.1The libghc-foo-dev package.2The libghc-foo-prof package.3The libghc-foo-doc package.4TA package related to a particular executable, perhaps but not necessarily a server.5cA package that holds the package's data files and any executables not assigned to other packages.6/The source package (not a binary deb actually.)7VThe source package of a haskell library (add prefix haskell- to source package name.)8LThis is used to construct the value for DEB_CABAL_PACKAGE in the rules file9This type represents a section of the control file other than the first, which in turn represent one of the binary packages or debs produced by this debianization.HThe different types of binary debs we can produce from a haskell package Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Package Nhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Architecture Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Essential Mhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10!/0836124579:;<=QRSTUVWXYZ[\]^_`ab!:;9<WVTXQSRUY012345678/=]`b^Z\_a[/ 0123456789  !:; None01QVN fUp until now cabal-debian only worked with Debian's or Ubuntu's ghc debs, which have binary package names ghc, ghc-prof, ghc-doc, etc. This type is intended to add support for Herbert Valerio Riedel's (hvr's) repository of several different versions of ghc and supporting tools happy, alex and cabal. These have different binary package names, and the packages put the executables in different locations than the Debian (and Ubuntu) packages. This option is activated when a directory such as optghc8.0.1=bin is present in $PATH and a ghc executable is found there.This function decides whether a deb name is that of one of debian/ubuntu's ghc packages or one of hvr's. If it is an hvr package it returns the version number embedded in its name.hReturn the a string containing the PATH environment variable value suitable for using some version of ghc from hvr's compiler repo.i4What version of Cabal goes with this version of GHC?j4What version of Happy goes with this version of GHC?k3What version of Alex goes with this version of GHC?m$Memoized version of newestAvailable'"FLook up the newest version of a deb available in the given changeroot.pkGeneral function to build a command line option that reads most of the possible values for CompilerFlavor.qfCompute the compiler package names by finding out what package contains the corresponding executable.rIO based alternative to newestAvailableCompilerId - install the compiler into the chroot if necessary and ask it for its version number. This has the benefit of working for ghcjs, which doesn't make the base ghc version available in the version number. fghijklmnopqr gmopnijkhflqr None1Vt Load a PackageDescription using the information in the Flags record - in particular, using the dependency environment in the EnvSet, find the newest available compiler of the requested compiler flavor and use that information load the configured PackageDescription.#'Run the package's configuration script.tt None0<V^uFind out what version, if any, of a cabal library is built into the newest version of haskell compiler hc in environment root. This is done by looking for .conf files beneath a package.conf.d directory and parsing the name. (Probably better to actually read the .conf file.)$Convert CompilerFlavor to an executable name in a way that works for at least the cases we are interested in. This might need to be fudged or replaced as more cases become interesting.%GUse which(1) to determine full path name to haskell compiler executable&LUse dpkg -S to convert the executable path to a debian binary package name.w;What built in libraries does this haskell compiler provide?'A package identifier is a package name followed by a dash and then a version number. A package name, according to the cabal users guide "can use letters, numbers and hyphens, but not spaces." So be it. uvwxyz{|} u{wyxzv|}None1;= 8Field will be copied to the binary packgae control files8Field will be copied to the source packgae control files:Field will be copied to the upload control (.changes) filevUser defined fields. Parse the line "XBS-Comment: I stand between the candle and the star." to get XField (fromList BS) Comment, " I stand between the candle and the star."This type represents the debian/control file, which is the core of the source package debianization. It includes the information that goes in the first, or source, section, and then a list of the succeeding binary package sections.( Hhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source) Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer* Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Changed-By+ Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Uploaders, Shttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-DM-Upload-Allowed- Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority. Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section/ Shttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Standards-Version0 Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Homepage1 Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-VCS-fields2 Bhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.73MThe binary debs. This should be a map, but we may need to preserve the order$~$~~ 4()*+,-./012567893None1QVtL.Information about the server we are packaging.!Host on which the server will runtPort on which the server will run. Obviously, this must assign each and every server package to a different port.FA comment that will be inserted to explain how the file was generated"start-stop-daemon --retry argument5Extra flags to pass to the server via the init script)The hint to install the server executable0Information about the web site we are packaging.The domain name assigned to the server. An apache configuration will be generated to redirect requests from this domain to hostname:portApache ServerAdmin parameter"The hint to install the server jobThe name of the executable file!where to find it, default is distbuild execName/where to put it, default is usrbin execName!name to give installed executable,Create a symbolic link in the binary package,Install a build file into the binary packageAInstall a build file into the binary package at an exact location5DHInstallTo somewhere relative to DataDir (see above)3Create a file with the given text at the given path2Install a cabal executable into the binary packageGInstall a cabal executable into the binary package at an exact location(Create a directory in the binary package<Information required to represent a non-cabal debianization.:HInformation regarding mode of operation - verbosity, dry-run, usage, etc;A warning to be reported later< Write debiansourceformat=the  debian/watch file>The rules file header?The rules file assignments@!The rules file include directivesA&Additional fragments of the rules fileBIOverride the copyright value computed from the cabal package description.C'The parsed contents of the control fileDCPut this text into a file with the given name in the debianization.E6The debhelper compatibility level, from debian/compat.FGThe changelog, first entry contains the source package name and versionG(Add an init.d file to the binary packageH6Add a stanza of a logrotate file to the binary packageIMap of debian/postinst4 scripts - to be run after install, should contain  DEBHELPER line before exit 0JMap of  debian/postrm8 scripts - scripts to run after remove, should contain  DEBHELPER line before exit 0KMap of debian/preinst5 scripts - to be run before install, should contain  DEBHELPER line before exit 0LMap of  debian/prerm4 scripts - to be run before remove, should contain  DEBHELPER line before exit 0M2set of items describing file installation requestsN(Do not produce a libghc-foo-doc package.O)Do not produce a libghc-foo-prof package.PeIf present, Do not put the version dependencies on the prof packages that we put on the dev packages.QIf present, don't generate the << dependency when we see a cabal equals dependency. (The implementation of this was somehow lost.)RThe build directory used by cabal, typically dist/build when building manually or dist-ghc/build when building using GHC and haskell-devscripts. This value is used to locate files produced by cabal so we can move them into the deb. Note that the --builddir option of runhaskell Setup appends the "/build" to the value it receives, so, yes, try not to get confused. FIXME: make this FilePath or Maybe FilePathSName to give to the debian source package. If not supplied the name is constructed from the cabal package name. Note that DebianNameMap could encode this information if we already knew the cabal package name, but we can't assume that.TYIf given, use this name for the base of the debian binary packages - the string between  'libghc-' and '-dev';. Normally this is derived from the hackage package name.UPSpecify the revision string to use when converting the cabal version to debian.VSpecify the exact debian version of the resulting package, including epoch. One use case is to work around the the "buildN" versions that are often uploaded to the debian and ubuntu repositories. Say the latest cabal version of transformers is 0.3.0.0, but the debian repository contains version 0.3.0.0-1build3, we need to specify debVersion="0.3.0.0-1build3" or the version we produce will look older than the one already available upstream.WHValue for the maintainer field in the control file. Note that the cabal maintainer field can have multiple addresses, but debian only one. If this is not explicitly set, it is obtained from the cabal file, and if it is not there then from the environment. As a last resort, there is a hard coded string in here somewhere.XName of a package that will get left-over data files and executables. If there are more than one, each package will get those files.YBThe text for the X-Description field of the Source package stanza.ZxEach element is a comment to be added to the changelog, where the element's text elements are the lines of the comment.[Lets cabal-debian know that a package it might expect to exist actually does not, so omit all uses in resulting debianization.\FMap a cabal Extra-Library name to a debian binary package name, e.g. 6ExtraLibMapping extraLibMap "cryptopp" "libcrypto-dev"8 adds a build dependency *and* a regular dependency on  libcrypto-dev to any package that has cryptopp! in its cabal Extra-Library list.]CMap a cabal Build-Tool name to a debian binary package name, e.g. 'ExecMapping "trhsx" "haskell-hsx-utils" adds a build dependency on haskell-hsx-utils to any package that has trhsx in its cabal build-tool list.^PHave Apache configure a site using PACKAGE, DOMAIN, LOGDIR, and APACHECONFIGFILE_0Set the Architecture field of the source package`.Set the Architecture field of a binary packagea,Set the Priority field of the source packageb*Set the Priority field of a binary packagec+Set the Section field of the source packaged)Set the Section field of a binary packagee2Create a binary package to hold a cabal executablefCLike DHExecutable, but configure the executable as a server processg7Like DHServer, but configure the server as a web serverh2Configure the executable to do incremental backupsiLimited version of Depends, put a dependency on the dev library package. The only reason to use this is because we don't yet know the name of the dev library package.j=Whether this packaging is created by the Debian Haskell Groupk1Whether or not to build and/or run the test suitelNormally self dependencies are filtered out of the debian build dependency list because they usually reflect interdependencies between the library and the executable in the Cabal packages. This flag turns off that filtering.+MLens to look up the binary deb description by name and create it if absent. Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Package_      !"#$%&'()*+_     "! +#$%&'()*5m:;<=>?@ABCDEFGHIJKLMNOPQRSTUVnWXYZ[\]^_`abcdefghijklNone12Bits and pieces of information about the mapping from cabal package names and versions to debian package names and versions. In essence, an Atoms value represents a package's debianization. The lenses in this module are used to get and set the values hidden in this Atoms value. Many of the values should be left alone to be set when the debianization is finalized.o1The result of reading a cabal configuration file.p<Information required to represent a non-cabal debianization.qMapping from cabal package name and version to debian source package name. This allows different ranges of cabal versions to map to different debian source package names.rXSpecify epoch numbers for the debian package generated from a cabal package. Example: EpochMapping (PackageName HTTP) 1.s'Supply some info about a cabal package.> Given the V. value read the cabalization and build a new 2 record. ,-./1029:;<=> 2,-./01<9:;=>,-./012topqrsNone2@ABCDEFGHIJKLMNO2BEDCAHGF@IJKLMNONone"#6<FNQTUV]P%This data type represents changes to B# state, requested at command line.QThis data type is an abomination. It represent information, provided on command line. Part of such information provides means to create initial B state and is stored in S field. See  newCabalInfo.YOther, much greater part represent changes to already created state. They are stored in T field.3All this can be understood from (simplified) types: type CabalT m a = StateT CabalInfo m a newCabalInfo :: Flags -> IO CabalInfo handleBehaviorAdjustment :: BehaviorAdjustment -> CabalT IO ()VWXYZ[\]^_PQRSTUVWQRSTPVWXYZ[\]^_WVUPuvwxyz{|}~QRSTNone;<=NVw?Turn the Debianization into a list of files, making sure the text associated with each path is unique. Assumes that finalizeDebianization has already been called. (Yes, I'm considering building one into the other, but it is handy to look at the Debianization produced by finalizeDebianization in the unit tests.):Assemble all the links by package and output one file eachwwNone1;=V {Try to input a file and if successful add it to the debianization's list of "intermediate" files, files which will simply be added to the final debianization without any understanding of their contents or purpose.2Look for a field and apply a function to its value|-Look in several places for a debian changelog}-Look in several places for a debian changelog4Construct a file path from the debian directory and a relative path, read its contents and add the result to the debianization. This may mean using a specialized parser from the debian package (e.g. parseChangeLog), and some files (like control) are ignored here, though I don't recall why at the moment.%Read a line from a debian .links file'Read a line from a debian .install file$Read a line from a debian .dirs file~Where to put the installed data files. Computes the destination directory from a Cabal package description. This needs to match the path cabal assigns to datadir in the distbuildkautogen/Paths_packagename.hs module, or perhaps the path in the CABAL_DEBIAN_DATADIR environment variable. Where to look for the data-filesz{|}~z{|}~None<sNone<7Create equals dependencies. For each pair (A, B), use dpkg-query to find out B's version number, version B. Then write a rule into P's .substvar that makes P require that that exact version of A, and another that makes P conflict with any older version of A.TAdd a debian binary package to the debianization containing a cabal executable file.jAdd a debian binary package to the debianization containing a cabal executable file set up to be a server.lAdd a debian binary package to the debianization containing a cabal executable file set up to be a web site.qAdd a debian binary package to the debianization containing a cabal executable file set up to be a backup script.Install configuration files to do log rotation. This does not work well with the haskell logging library, so it is no longer called in siteAtoms.VA configuration file for the logrotate facility, installed via a line in debianFiles.None0;=>?FQTV7Build the Debian package name for a given package type.Function that applies the mapping from cabal names to debian names based on version numbers. If a version split happens at v, this will return the ltName if < v, and the geName if the relation is >= v.Build a debian package name from a cabal package name and a debian package type. Unfortunately, this does not enforce the correspondence between the PackageType value and the name type, so it can return nonsense like (SrcPkgName "libghc-debian-dev").Map all versions of Cabal package pname to Debian package dname. Not really a debian package name, but the name of a cabal package that maps to the debian package name we want. (Should this be a SrcPkgName?)JMap versions less than ver of Cabal Package pname to Debian package ltname/Replace any existing mapping of the cabal name pname with the debian name dnamea. (Use case: to change the debian package name so it differs from the package provided by ghc.)None"Update the CabalInfo value in the CabalT state with some details about the debian repository - special cases for how some cabal packages are mapped to debian package names.NonejNoneNV^ Naive conversion of Cabal build dependencies to Debian dependencies will usually result in a self dependency, due to the fact that a Cabal executable often depends on the associated library to build. Due to the fact that Debian build dependencies are global to the package, this results in unwanted self dependencies, which usually need to be filtered out. Unfortunately, some Debian packages actually do depend on an earlier version of themselves to build (e.g. most compilers.) So a command line option is probably necessary.selfDependency :: PackageIdentifier -> Dependency_ -> Bool selfDependency pkgId (BuildDepends (Dependency name _)) = name == pkgName pkgId selfDependency _ _ = FalsefDebian packages don't have per binary package build dependencies, so we just gather them all up here.ETake the intersection of all the dependencies on a given package nameVCollect the dependencies required to build any packages that have architecture "all".The documentation dependencies for a package include the documentation package for any libraries which are build dependencies, so we have use to all the cross references.The Debian build dependencies for a package include the profiling libraries and the documentation packages, used for creating cross references. Also the packages associated with extra libraries.Turn a cabal dependency into debian dependencies. The result needs to correspond to a single debian package to be installed, so we will return just an OrRelation.If a package is bundled with the compiler we make the compiler a substitute for that package. If we were to specify the virtual package (e.g. libghc-base-dev) we would have to make sure not to specify a version number.return and of ors of relNone;<=V)debianize customize initializes the CabalT state from the environment and the cabal package description in (and possibly the debian/changelog file) from the current directory, then runs  customize> and finalizes the debianization so it is ready to be output.Pass a function with some additional work to do. I don't know if this could be done by just summing it with customize - probably. But I don't want to untangle this right now.0Do some light IO and call finalizeDebianization.!Now that we know the build and data directories, we can expand some atoms into sets of simpler atoms which can eventually be turned into the files of the debianization. The original atoms are not removed from the list because they may contribute to the debianization in other ways, so be careful not to do this twice, this function is not idempotent. (Exported for use in unit tests.) FIXME: we should be able to run this without a PackageDescription, change paramter type to Maybe PackageDescription and propagate down thru codeCompute the final values of the BinaryDebDescription record description fields from the cabal descriptions and the values that have already been set.4Construct the final Debian version number. Inputs: --deb-version argument--revision argumentcabal version number"latest version in debian/changelog0The --deb-version argument overrides everything.lReturn the Debian epoch number assigned to the given cabal package - the 1 in version numbers like 1:3.5-2.Compute and return the debian source package name, based on the sourcePackageName if it was specified, and constructed from the cabal name otherwise.+Try to compute a string for the the debian  Maintainer: and  Uploaders:> fields using, in this order 1. the Debian Haskell Group, /pkg-haskell-maintainers@lists.alioth.debian.org, if --official is set 2. the maintainer explicitly specified using "Debian.Debianize.Monad.maintainer" 3. the maintainer field of the cabal package, but only if --official is not set, 4. the value returned by getDebianMaintainer, which looks in several environment variables, 5. the signature from the latest entry in debian/changelog, 6. the Debian Haskell Group, /pkg-haskell-maintainers@lists.alioth.debian.org  Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Uploaders4If l is the empty list return d, otherwise return l.+The Cabal package has one synopsis and one description field for the entire package, while in a Debian package there is a description field (of which the first line is synopsis) in each binary package. So the cabal description forms the base of the debian description, each of which is amended.Make sure there is a changelog entry with the version number and source package name implied by the debianization. This means either adding an entry or modifying the latest entry (if its version number is the exact one in our debianization.)Convert the extraLibs field of the cabal build info into debian binary package names and make them dependendencies of the debian devel package (if there is one.)@Applies a few settings to official packages (unless already set)CFilter out any relations that mention any of the bad package names.<Add the library paragraphs for a particular compiler flavor.^This is the standard value for the Description field of a binary package control file stanza.TMake sure all data and executable files are assigned to at least one binary package and make sure all binary packages are in the package list in the source deb description. If there are left over files, assign them to the packages returned by the utilsPackageNames lens, and make sure those packages are in the source deb description.1Add the normal default values to the rules files.None "#0;=NQVAPRun the script in debian/Debianize.hs2 with the given command line arguments. Returns True if the script exists and succeeds. In this case it may be assumed that a debianization was created (or updated) in the debian subdirectory of the current directory. In this way we can include a script in a package to produce a customized debianization more sophisticated than the one that would be produced by the cabal-debian executable. An example is included in the debian subdirectory of this library.aPerform whole debianization. You provide your customization, this function does everything else.Depending on the options in atomsC, either validate, describe, or write the generated debianization.%Write the files of the debianization d to ./debian|Return a string describing the debianization - a list of file names and their contents in a somewhat human readable format.Do only the usual maintenance changes when upgrading to a new version and avoid changing anything that is usually manually maintained.WCompare the old and new debianizations, returning a string describing the differences.BMake sure the new debianization matches the existing debianization in several ways - specifically, version number, and the names of the source and binary packages. Some debian packages come with a skeleton debianization that needs to be filled in, this can be used to make sure the debianization we produce is usable.  NoneA}*34:IMOPNQRUTSVWXYZ[\]^_mnopqrstuv}xwyz{|~      !"#$%&'()*+,-./0836124579:;<=QRSTUVWXYZ[\]^_`abt~      !"#$%&'()*+,-./1029:;<=>@ABCDEFGHIKLz{|SafeHSafeVMUDo a hard reset of all the files of the repository containing the working directory.sDo a hard reset of all the files of a subdirectory within a git repository. (Does this every throw an exception?)uDetermine whether the repository containing the working directory is in a modified state, if so return the messages. !" !#$%&'()*+,-./012234556789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqqrstuuvwxyz{|}~kl                 ! ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                               !"#$%&'()*+,-./0123456789:;<=>?@ABBCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdeffghijklmnopqrstuvwxyz{|}~kl         ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !     ! " I # $ % & ' ( ) * + S , - . / 0 1 2 3 4 56789:;<=>?@ABCDEFgGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Ge79qa_o=vHU(cabal-debian-4.38-5Tb4oKEFBVqKINsgOTlTu3Distribution.Version.InvertData.Maybe.ExtendedDebian.Debianize.ChangelogDebian.Debianize.InterspersedDebian.Debianize.VersionSplitsDebian.Debianize.PreludeDebian.Debianize.BasicInfo Debian.Policy%Debian.Debianize.CopyrightDescription%Debian.Debianize.BinaryDebDescription Debian.GHCDebian.Debianize.InputCabalDebian.Debianize.Bundled%Debian.Debianize.SourceDebDescriptionDebian.Debianize.DebInfoDebian.Debianize.CabalInfoDebian.Debianize.MonadDebian.Debianize.OptparseDebian.Debianize.FilesDebian.Debianize.InputDebianDebian.Debianize.ExecAtomsDebian.Debianize.GoodiesDebian.Debianize.DebianNameDebian.Debianize.Details"Debian.Debianize.BuildDependenciesDebian.Debianize.FinalizeDebian.Debianize.OutputPaths_cabal_debian System.GitDebian.OrphansDebian.Debianize Cabal-2.0.1.0Distribution.VersioninvertVersionIntervalsinvertVersionRange nothingIf filterEntriesdropFutureEntriesfindChangelogEntrymergeChangelogEntries Interspersedleftmostpairs foldTriples foldInverted foldArounds foldBetweens$fInterspersedSplitsDouble[] $fShowSplits VersionSplits oldestPackagesplitsDebBase unDebBase makePackage insertSplitpackageRangesFromVersionSplitsdebianFromCabalcabalFromDebian'cabalFromDebiandoSplits)$fInterspersedVersionSplitsDebBaseVersion$fShowVersionSplits $fEqDebBase $fOrdDebBase $fReadDebBase $fShowDebBase $fDataDebBase$fEqVersionSplits$fOrdVersionSplits$fDataVersionSplitsDebMapcurry3buildDebVersionMap!strip stripWith strictReadF replaceFile modifyFilediffFileremoveIfExists dpkgFileMap debOfFilecond readFile' readFileMaybeshowDeps showDeps'withCurrentDirectorygetDirectoryContents' setMapMaybezipMaps foldEmptymaybeLindent maybeReadread'modifyMintToVerbosity' listElemLens maybeLens fromEmpty fromSingleton.?=escapeDebianWildcards $fPrettyPP $fPrettyPP0DebTypeDevProfDocEnvSetcleanOSdependOSbuildOSFlags _verbosity_dryRun_upgrade _roundtrip _validate_compilerFlavor_cabalFlagAssignments _buildEnv $fEqEnvSet $fOrdEnvSet $fShowEnvSet $fDataEnvSet $fEqFlags $fOrdFlags $fShowFlags $fDataFlags $fEqDebType $fOrdDebType $fReadDebType $fShowDebType $fDataDebTypebuildEnvcabalFlagAssignmentscompilerFlavordryRun roundtripupgradevalidate verbosity flagOptionsLicense Public_DomainApacheArtistic BSD_2_Clause BSD_3_Clause BSD_4_ClauseISCCC_BYCC_BY_SACC_BY_NDCC_BY_NC CC_BY_NC_SA CC_BY_NC_NDCC0CDDLCPLEFLExpatGPLLGPLGFDLGFDL_NIVLPPLMPLPerlPythonQPLW3CZlibZope OtherLicenseAreaMainContribNonFree MultiArchMANoMASame MAForeign MAAllowedSection MainSection AreaSectionPackageArchitecturesAllAnyNamesPackagePriorityRequired ImportantStandardOptionalExtra SourceFormatNative3Quilt3StandardsVersiondatabaseDirectory dataDirectoryapacheLogDirectoryapacheErrorLogapacheAccessLogserverLogDirectory serverAppLogserverAccessLogappLogBaseNameerrorLogBaseNameaccessLogBaseNamedebianPackageVersiongetDebhelperCompatLevelgetDebianStandardsVersionparseStandardsVersionreadSourceFormat readPriorityparsePackageArchitectures readSection readMultiArchgetCurrentDebianUserhaskellMaintainerparseUploadersparseMaintainermaintainerOfLastResortfromCabalLicensetoCabalLicense readLicense $fPrettyPP1 $fPrettyPP2 $fPrettyPP3 $fPrettyPP4 $fPrettyPP5$fPrettyLicense$fEqStandardsVersion$fOrdStandardsVersion$fShowStandardsVersion$fDataStandardsVersion$fEqSourceFormat$fOrdSourceFormat$fShowSourceFormat$fDataSourceFormat$fEqPackagePriority$fOrdPackagePriority$fReadPackagePriority$fShowPackagePriority$fDataPackagePriority$fReadPackageArchitectures$fEqPackageArchitectures$fOrdPackageArchitectures$fShowPackageArchitectures$fDataPackageArchitectures$fReadMultiArch $fEqMultiArch$fOrdMultiArch$fShowMultiArch$fDataMultiArch $fReadArea$fEqArea $fOrdArea $fShowArea $fDataArea $fReadSection $fEqSection $fOrdSection $fShowSection $fDataSection $fReadLicense $fShowLicense $fEqLicense $fOrdLicense $fDataLicenseFilesOrLicenseDescriptionFilesDescriptionLicenseDescription _filesPattern_filesCopyright _filesLicense_filesLicenseText _filesComment_license _licenseText_commentCopyrightDescription_format _upstreamName_upstreamContact_upstreamSource _disclaimer_summaryComment_summaryLicense_summaryCopyright_filesAndLicensesreadCopyrightDescriptionparseCopyrightDescriptiondefaultCopyrightDescription$fDefaultCopyrightDescription$fPrettyCopyrightDescription$fEqFilesOrLicenseDescription$fOrdFilesOrLicenseDescription$fShowFilesOrLicenseDescription$fDataFilesOrLicenseDescription$fEqCopyrightDescription$fOrdCopyrightDescription$fShowCopyrightDescription$fDataCopyrightDescription disclaimerfilesAndLicensesformatsummaryCommentsummaryCopyrightsummaryLicenseupstreamContact upstreamNameupstreamSourcecomment filesCommentfilesCopyright filesLicensefilesLicenseText filesPatternlicense licenseTextPackageRelations PackageType Development Profiling DocumentationExec UtilitiesSource HaskellSourceCabalBinaryDebDescription Canonical canonicalnewBinaryDebDescriptionnewPackageRelations $fCanonical[]$fCanonicalPackageRelations$fCanonicalBinaryDebDescription$fCanonical[]0$fEqPackageType$fOrdPackageType$fShowPackageType$fReadPackageType$fDataPackageType$fEqPackageRelations$fOrdPackageRelations$fReadPackageRelations$fShowPackageRelations$fDataPackageRelations$fEqBinaryDebDescription$fOrdBinaryDebDescription$fReadBinaryDebDescription$fShowBinaryDebDescription$fDataBinaryDebDescription architecturebinaryPriority binarySection description essential multiArchpackage packageType relationsbreaks builtUsing conflictsdepends preDependsprovides recommendsreplacessuggests$fMemoizableWord64$fMemoizableCompilerFlavor$fMemoizableVersionisHVRCompilerPackagewithCompilerVersionhvrCompilerPATHhvrCabalVersionhvrHappyVersionhvrAlexVersionwithModifiedPATHnewestAvailablenewestAvailableCompilerIdcompilerIdFromDebianVersioncompilerFlavorOptioncompilerPackageNamegetCompilerInfo$fMemoizableBinPkgNameinputCabalizationbuiltIn hcVersionaptCacheProvidesaptCacheConflictsaptCacheDepends aptVersionsaptCacheShowPkg parseVersion'tests XFieldDestBSCXFieldVersionControlSpec VCSBrowserVCSArchVCSBzrVCSCvsVCSDarcsVCSGitVCSHgVCSMtnVCSSvnSourceDebDescriptionnewSourceDebDescriptionnewSourceDebDescription'$fCanonicalSourceDebDescription$fEqVersionControlSpec$fOrdVersionControlSpec$fShowVersionControlSpec$fDataVersionControlSpec$fEqXFieldDest$fOrdXFieldDest$fReadXFieldDest$fShowXFieldDest$fDataXFieldDest $fEqXField $fOrdXField $fShowXField $fDataXField$fEqSourceDebDescription$fOrdSourceDebDescription$fShowSourceDebDescription$fDataSourceDebDescriptionbinaryPackagesbuildConflictsbuildConflictsIndep buildDependsbuildDependsIndep changedBydmUploadAllowedhomepage maintainerprioritysectionsourcestandardsVersion uploaders vcsFields xDescriptionxFields TestsStatus TestsDisable TestsBuildTestsRunServerhostnameport headerMessageretry serverFlags installFileSitedomain serverAdminserver InstallFileexecName sourceDirdestDirdestNameAtomLinkInstall InstallTo InstallDataFileInstallCabalExecInstallCabalExecTo InstallDirDebInfo makeDebInfo$fCanonicalDebInfo $fShowAtom$fEqAtom $fOrdAtom $fDataAtom$fReadInstallFile$fShowInstallFile$fEqInstallFile$fOrdInstallFile$fDataInstallFile $fReadServer $fShowServer $fEqServer $fOrdServer $fDataServer $fReadSite $fShowSite$fEqSite $fOrdSite $fDataSite$fEqTestsStatus$fShowTestsStatus$fDataTestsStatus $fShowDebInfo $fDataDebInfoallowDebianSelfBuildDeps apacheSiteatomSetbackupsbinaryArchitecturesbinaryPrioritiesbinarySectionsbuildDir changelogcommentscompatcontrol copyright debVersionexecMap executable extraDevDeps extraLibMapflags installInitintermediateFileslogrotateStanzamaintainerOptionmissingDependenciesnoDocumentationLibrarynoProfilingLibraryofficial omitLTDepsomitProfVersionDepsoverrideDebianNameBasepostInstpostRmpreInstpreRmrevisionrulesFragments rulesHead rulesIncludes rulesSettings serverInfosourceArchitectures sourceFormatsourcePackageNamesourcePriority sourceSection testsStatusuploadersOptionutilsPackageNameBasewarningwatchwebsitexDescriptionTextlinkinstall installTo installDatafileinstallCabalExecinstallCabalExecTo installDirbinaryDebDescription PackageInfo cabalNamedevDebprofDebdocDeb CabalInfo$fEqPackageInfo$fOrdPackageInfo$fShowPackageInfo$fDataPackageInfo$fShowCabalInfo$fDataCabalInfodebInfo debianNameMapepochMappackageDescription packageInfo newCabalInfo$fCanonicalCabalInfoDebianTCabalMCabalT execCabalT evalCabalT runCabalT execCabalM evalCabalM runCabalM evalDebianT evalDebian execDebianT liftCabalifMwhenMunlessMBehaviorAdjustmentCommandLineOptions_flags _adjustmenthandleBehaviorAdjustmentparseProgramArguments'parseProgramArguments$fNewtypeBuildDep$fNewtypeBuildDepIndep$fNewtypeDevDep$fNewtypeExtraDepends$fNewtypeExtraConflicts$fNewtypeExtraProvides$fNewtypeExtraReplaces$fNewtypeExtraRecommends$fNewtypeExtraSuggests$fNewtypeCabalDebMapping$fNewtypeExecDebMapping$fNewtypeRevision$fNewtypeCabalEpochMapping$fNewtypeCabalFlagMapping$fEqHaddockStatus$fEqProfilingStatus$fEqOfficialStatus$fGenericBuildDep$fGenericBuildDepIndep$fGenericDevDep$fGenericExtraDepends$fGenericExtraConflicts$fGenericExtraProvides$fGenericExtraReplaces$fGenericExtraRecommends$fGenericExtraSuggests$fGenericCabalDebMapping$fGenericExecDebMapping$fGenericRevision$fGenericCabalEpochMapping$fGenericCabalFlagMappingdebianizationFileMapinputDebianizationinputDebianizationFileinputChangeLog loadChangeLogdataDestdataTop execAtomstightDependencyFixup doExecutabledoServer doWebsite doBackupsoldClckwrksSiteFlagsoldClckwrksServerFlags siteAtoms logrotate serverAtoms backupAtoms expandWebsite expandServer expandBackups debianNamedebianNameBase mkPkgName mkPkgName'mapCabal splitCabal remapCabal$fEqDependency_$fShowDependency_debianDefaultsdebianBuildDepsdebianBuildDepsIndep $fShowRels debianizedebianizeWebsite debianizeWith watchAtomrunDebianizeScriptperformDebianizationperformDebianizationOfWebsiteperformDebianizationWithfinishDebianizationwriteDebianizationdescribeDebianizationcompareDebianizationvalidateDebianizationversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName gitResetHardgitResetSubdir gitUnclean gitIsClean withCleanRepobaseGHC.BaseMaybeNothingJust Data.MaybemaybeisJust isNothing fromMaybe maybeToList listToMaybe catMaybesmapMaybefromJustSplits dropPrefixDistribution.VerbosityintToVerbosityDistribution.Types.PackageIdPackageIdentifierpkgName pkgVersionDistribution.Types.PackageName mkPackageName unPackageName PackageName hasLowerBound hasUpperBoundintersectVersionIntervalsunionVersionIntervalsfromVersionIntervalstoVersionIntervalswithinIntervalsmkVersionIntervalsversionIntervalssimplifyVersionRangeisSpecificVersion isNoVersion isAnyVersionasVersionIntervals withinRangefoldVersionRange'foldVersionRangeremoveLowerBoundremoveUpperBoundbetweenVersionsInclusivemajorBoundVersion withinVersiondifferenceVersionRangesintersectVersionRangesunionVersionRangesorEarlierVersionearlierVersionorLaterVersion laterVersionnotThisVersion thisVersion noVersion anyVersion showVersion alterVersion nullVersionversionNumbers mkVersion' mkVersionVersion VersionRange AnyVersion ThisVersion LaterVersionEarlierVersionWildcardVersionMajorBoundVersionUnionVersionRangesIntersectVersionRangesVersionRangeParensVersionIntervalsVersionInterval LowerBound UpperBound NoUpperBoundBoundExclusiveBoundInclusiveBounddots_package _architecture _essential _description _relations_depends _recommends _suggests _preDepends_breaks _conflicts _provides _replaces _builtUsing _packageType_binarySection_binaryPriority _multiArchnewestAvailable' autoreconf hcExecutablehcExecutablePath hcBinPkgNameparsePackageIdentifier_source _maintainer _changedBy _uploaders_dmUploadAllowed _priority_section_standardsVersion _homepage _vcsFields_xFields_binaryPackages _buildDepends_buildConflicts_buildDependsIndep_buildConflictsIndep _xDescription_warning _sourceFormat_watch _rulesHead_rulesSettings_rulesIncludes_rulesFragments _copyright_control_intermediateFiles_compat _changelog _installInit_logrotateStanza _postInst_postRm_preInst_preRm_atomSet_noDocumentationLibrary_noProfilingLibrary_omitProfVersionDeps _omitLTDeps _buildDir_sourcePackageName_overrideDebianNameBase _revision _debVersion_uploadersOption_utilsPackageNameBase_xDescriptionText _comments_missingDependencies _extraLibMap_execMap _apacheSite_sourceArchitectures_binaryArchitectures_sourcePriority_binaryPriorities_sourceSection_binarySections _executable _serverInfo_website_backups _extraDevDeps _official _testsStatus_allowDebianSelfBuildDeps_maintainerOption_packageDescription_debInfo_debianNameMap _epochMap _packageInfo_defaultPackage_missingDependency_debianNameBase_debianVersion _buildDep_buildDepIndep_devDep _extraDepends_extraConflicts_extraProvides_extraReplaces_extraRecommends_extraSuggests_cabalDebMapping_cabalEpochMapping_execDebMapping _profiling_haddock_testsCabalFlagMappingCabalEpochMappingRevisionExecDebMappingCabalDebMapping ExtraSuggestsExtraRecommends ExtraReplaces ExtraProvidesExtraConflicts ExtraDependsDevDep BuildDepIndepBuildDepOfficialStatusOfficial NonOfficialProfilingStatusProfilingEnabledProfilingDisabled HaddockStatusHaddockEnabledHaddockDisabledlinksfindMapinputCabalInforeadLink readInstallreadDirserverLogrotate' Dependency_ BuildDepends BuildToolsPkgConfigDepends ExtraLibsunboxDependencyallBuildDependsmergeCabalDependenciesdocDependenciesbuildDependencies dependencies doBundledRelsAndOrRel'unAndunOrunRelfinalizeDebianizationfinalizeDebianization' debianVersion debianEpochfinalizeSourceNamefinalizeMaintainer whenEmptydebianDescriptionBasefinalizeChangelogaddExtraLibDependenciescheckOfficialSettingsfilterRelations librarySpecsdescmakeUtilsPackage finalizeRulesmergeDebianization