!l(      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01234 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' cabal-debian?Apply a filter to the version numbers of the changelog entries.  cabal-debian-Filter out versions newer than the given one.  cabal-debian*Find the log entry with the given version.  None1=?@AC1q cabal-debian An example  cabal-debianA 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.    None12=?2None2=?@AE/ cabal-debianDescribes 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". cabal-debian>The Debian name given to versions older than the oldest split. cabal-debianEach 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 cabal-debian`The base of a debian binary package name, the string that appears between "libghc-" and "-dev". cabal-debianfCreate a version split database that assigns a single debian package name base to all cabal versions. cabal-debian?Split the version range and give the older packages a new name.! cabal-debianABrute force implementation - I'm assuming this is not a huge map." cabal-debianGiven a version split database, turn the debian version requirements into a debian package name base that ought to satisfy them. cabal-debian Where to split the version range cabal-debian1The name to use for versions older than the split !"! "None=>?SXV= / cabal-debian$Query versions of installed packages4 cabal-debianYWrite a file which we might still be reading from in order to compute the text argument.5 cabal-debianPCompute the new file contents from the old. If f returns Nothing do not write.8 cabal-debianCreate a map from pathname to the names of the packages that contains that pathname using the contents of the debian package info directory varlibdpkginfo.9 cabal-debian:Given a path, return the name of the package that owns it.? cabal-debianEFrom Darcs.Utils - set the working directory and run an IO operation.@ cabal-debian'Get directory contents minus dot files.D cabal-debian=If the current value of view x is Nothing, replace it with f.I cabal-debian Version of ? that first clamps its argument to the acceptable range (0-3).N cabal-debianSet 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 isJustO cabal-debian0This should probably be used in a lot of places.     -./0123456789:;<=>?@ABCDEFGHIJKLMNO*.-/0123456789:;<=>?@ABCDEFGHIJKLMNONone2uR cabal-debian+A redundant data type, too lazy to expunge.X cabal-debian%The output of the debootstrap commandY cabal-debian0An environment with build dependencies installedZ cabal-debian,An environment where we have built a package[ cabal-debiannThis record supplies enough information to locate and load a debianization or a cabal file from the IO monad.] cabal-debian=Run with progress messages at the given level of verboseness.^ cabal-debianYDon't write any files or create any directories, just explain what would have been done._ cabal-debianCarefully upgrade the packaging` cabal-debianINormalize a debianization (field order, whitespace) by round-tripping it.a cabal-debianRFail 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.b cabal-debianWhich 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.)c cabal-debianFlags 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.d cabal-debian 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 "/".z cabal-debianWCommand line options which build a function that modifies a state monad value of type [RTUSVWZXY[\]^_`abcdrstuvwxyz[\]^_`abcdVWZXYRTUSyuwvxtsrzNone2=?,{ cabal-debian/Official Debian license types as described in  Xhttps://www.debian.org/doc/packaging-manuals/copyright-format/1.0/#license-specification.| cabal-debian^No license required for any purpose; the work is not subject to copyright in any jurisdiction.} cabal-debianApache license 1.0, 2.0.~ cabal-debianArtistic license 1.0, 2.0. cabal-debian9Berkeley software distribution license, 2-clause version. cabal-debian9Berkeley software distribution license, 3-clause version. cabal-debian9Berkeley software distribution license, 4-clause version. cabal-debianJInternet Software Consortium, sometimes also known as the OpenBSD License. cabal-debian8Creative Commons Attribution license 1.0, 2.0, 2.5, 3.0. cabal-debianDCreative Commons Attribution Share Alike license 1.0, 2.0, 2.5, 3.0. cabal-debianGCreative Commons Attribution No Derivatives license 1.0, 2.0, 2.5, 3.0. cabal-debianGCreative Commons Attribution Non-Commercial license 1.0, 2.0, 2.5, 3.0. cabal-debianSCreative Commons Attribution Non-Commercial Share Alike license 1.0, 2.0, 2.5, 3.0. cabal-debianVCreative Commons Attribution Non-Commercial No Derivatives license 1.0, 2.0, 2.5, 3.0. cabal-debian*Creative Commons Zero 1.0 Universal. Omit  Universal6 from the license version when forming the short name. cabal-debian0Common Development and Distribution License 1.0. cabal-debianIBM Common Public License. cabal-debian"The Eiffel Forum License 1.0, 2.0. cabal-debianThe Expat license. cabal-debian)GNU General Public License 1.0, 2.0, 3.0. cabal-debianVGNU Lesser General Public License 2.1, 3.0, or GNU Library General Public License 2.0. cabal-debianGNU 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. cabal-debianGNU Free Documentation License, with no Front-Cover or Back-Cover Texts or Invariant Sections. Use the same version numbers as GFDL. cabal-debian1LaTeX Project Public License 1.0, 1.1, 1.2, 1.3c. cabal-debianMozilla Public License 1.1. cabal-debian0erl license (use "GPL-1+ or Artistic-1" instead) cabal-debianPython license 2.0. cabal-debianQ Public License 1.0. cabal-debianSW3C Software License For more information, consult the W3C Intellectual Rights FAQ. cabal-debianzlib/libpng license. cabal-debian'Zope Public License 1.0, 1.1, 2.0, 2.1. cabal-debianAny other license name cabal-debian6The architectures for which a binary deb can be built. cabal-debian(The package is architecture independenct cabal-debian-The package can be built for any architecture cabal-debian"The list of suitable architectures cabal-debianZWith the current state of CDBS, anything above 10 breaks, so for now we force this to 10. cabal-debian"Assumes debian-policy is installed cabal-debianTTurn the uploaders field of a cabal package into a list of RFC2822 NameAddr values. cabal-debian2Parse a string containing a single NameAddr value. cabal-debianTMaintainer is a mandatory field, so we need a value we can use when all else fails. cabal-debianhConvert the Cabal license to a Debian license. I would welcome input on how to make this more correct. cabal-debianXConvert a Debian license to a Cabal license. Additional cases and corrections welcome. cabal-debian3I think we need an actual parser for license names.W{}|~W{}|~None 2=?PX_  cabal-debianDescription 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. cabal-debianRead a  ( from the text one might obtain from a debian/copyright file. cabal-debian(Try to parse a structured copyright file cabal-debianInfer 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. cabal-debian$Replace empty lines with single dots*     #$%&'()*+,-./0123*     %*)+#&('$1./0-23, None2=?Х5 cabal-debian&Package interrelationship information.6 cabal-debianThe libghc-foo-dev package.7 cabal-debianThe libghc-foo-prof package.8 cabal-debianThe libghc-foo-doc package.9 cabal-debianTA package related to a particular executable, perhaps but not necessarily a server.: cabal-debiancA package that holds the package's data files and any executables not assigned to other packages.; cabal-debian/The source package (not a binary deb actually.)< cabal-debianVThe source package of a haskell library (add prefix haskell- to source package name.)= cabal-debianLThis is used to construct the value for DEB_CABAL_PACKAGE in the rules file> cabal-debianThis 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  cabal-debian Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Package! cabal-debian Nhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Architecture" cabal-debian Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Essential# cabal-debian Mhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description$ cabal-debian Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10!45=;6789:<>?@ABVWXYZ[\]^_`abcdefg!?@>A\[Y]VXWZ^5=;6789:<4Bbegc_adf` NoneSX۩j cabal-debian$Memoized version of newestAvailable'% cabal-debian-Look up the newest version of a deb availablem cabal-debiankGeneral function to build a command line option that reads most of the possible values for CompilerFlavor.n cabal-debianfCompute the compiler package names by finding out what package contains the corresponding executable.o cabal-debianIO 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.hijklmnohjlmkino None2Xp cabal-debian 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.& cabal-debian'Run the package's configuration script.pp None>Xq cabal-debianFind 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.)' cabal-debianConvert 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.( cabal-debianGUse which(1) to determine full path name to haskell compiler executable) cabal-debianLUse dpkg -S to convert the executable path to a debian binary package name.s cabal-debian;What built in libraries does this haskell compiler provide?* cabal-debian#A list of the files in a binary deb+ cabal-debianA 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. qrstuvwxy qwsutvrxy None2=? { cabal-debian8Field will be copied to the binary packgae control files| cabal-debian8Field will be copied to the source packgae control files} cabal-debian:Field will be copied to the upload control (.changes) file~ cabal-debianvUser 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." cabal-debianThis 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., cabal-debian Hhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Source- cabal-debian Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer. cabal-debian Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Changed-By/ cabal-debian Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Uploaders0 cabal-debian Shttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-DM-Upload-Allowed1 cabal-debian Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority2 cabal-debian Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section3 cabal-debian Shttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Standards-Version4 cabal-debian Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Homepage5 cabal-debian Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-VCS-fields6 cabal-debian Bhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.77 cabal-debianMThe binary debs. This should be a map, but we may need to preserve the order$z}|{~$~z}|{None2SXL cabal-debian.Information about the server we are packaging. cabal-debian!Host on which the server will run cabal-debiantPort on which the server will run. Obviously, this must assign each and every server package to a different port. cabal-debianFA comment that will be inserted to explain how the file was generated cabal-debian"start-stop-daemon --retry argument cabal-debian5Extra flags to pass to the server via the init script cabal-debian)The hint to install the server executable cabal-debian0Information about the web site we are packaging. cabal-debianThe domain name assigned to the server. An apache configuration will be generated to redirect requests from this domain to hostname:port cabal-debianApache ServerAdmin parameter cabal-debian"The hint to install the server job cabal-debianThe name of the executable file cabal-debian!where to find it, default is distbuild execName/ cabal-debianwhere to put it, default is usrbin execName cabal-debian!name to give installed executable cabal-debian,Create a symbolic link in the binary package cabal-debian,Install a build file into the binary package cabal-debianAInstall a build file into the binary package at an exact location cabal-debian5DHInstallTo somewhere relative to DataDir (see above) cabal-debian3Create a file with the given text at the given path cabal-debian2Install a cabal executable into the binary package cabal-debianGInstall a cabal executable into the binary package at an exact location cabal-debian(Create a directory in the binary package cabal-debian<Information required to represent a non-cabal debianization.8 cabal-debianHInformation regarding mode of operation - verbosity, dry-run, usage, etc9 cabal-debianA warning to be reported later: cabal-debian Write debiansourceformat; cabal-debianthe  debian/watch file< cabal-debianThe rules file header= cabal-debianThe rules file assignments> cabal-debian!The rules file include directives? cabal-debian&Additional fragments of the rules file@ cabal-debianIOverride the copyright value computed from the cabal package description.A cabal-debian'The parsed contents of the control fileB cabal-debianCPut this text into a file with the given name in the debianization.C cabal-debian6The debhelper compatibility level, from debian/compat.D cabal-debianGThe changelog, first entry contains the source package name and versionE cabal-debian(Add an init.d file to the binary packageF cabal-debian6Add a stanza of a logrotate file to the binary packageG cabal-debianMap of debian/postinst4 scripts - to be run after install, should contain  DEBHELPER line before exit 0H cabal-debianMap of  debian/postrm8 scripts - scripts to run after remove, should contain  DEBHELPER line before exit 0I cabal-debianMap of debian/preinst5 scripts - to be run before install, should contain  DEBHELPER line before exit 0J cabal-debianMap of  debian/prerm4 scripts - to be run before remove, should contain  DEBHELPER line before exit 0K cabal-debian2set of items describing file installation requestsL cabal-debian(Do not produce a libghc-foo-doc package.M cabal-debian)Do not produce a libghc-foo-prof package.N cabal-debianeIf present, Do not put the version dependencies on the prof packages that we put on the dev packages.O cabal-debianIf present, don't generate the << dependency when we see a cabal equals dependency. (The implementation of this was somehow lost.)P cabal-debianThe 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 FilePathQ cabal-debianName 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.R cabal-debianYIf 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.S cabal-debianPSpecify the revision string to use when converting the cabal version to debian.T cabal-debianSpecify 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.U cabal-debianHValue 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.V cabal-debianName of a package that will get left-over data files and executables. If there are more than one, each package will get those files.W cabal-debianBThe text for the X-Description field of the Source package stanza.X cabal-debianxEach element is a comment to be added to the changelog, where the element's text elements are the lines of the comment.Y cabal-debianLets cabal-debian know that a package it might expect to exist actually does not, so omit all uses in resulting debianization.Z cabal-debianFMap 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.[ cabal-debianCMap 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.\ cabal-debianPHave Apache configure a site using PACKAGE, DOMAIN, LOGDIR, and APACHECONFIGFILE] cabal-debian0Set the Architecture field of the source package^ cabal-debian.Set the Architecture field of a binary package_ cabal-debian,Set the Priority field of the source package` cabal-debian*Set the Priority field of a binary packagea cabal-debian+Set the Section field of the source packageb cabal-debian)Set the Section field of a binary packagec cabal-debian2Create a binary package to hold a cabal executabled cabal-debianCLike DHExecutable, but configure the executable as a server processe cabal-debian7Like DHServer, but configure the server as a web serverf cabal-debian2Configure the executable to do incremental backupsg cabal-debianLimited 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.h cabal-debian=Whether this packaging is created by the Debian Haskell Groupi cabal-debian1Whether or not to build and/or run the test suitej cabal-debianNormally 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.' cabal-debianMLens 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_      !"#$%&'_     ' !"#$%&None2. cabal-debianBits 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.k cabal-debian1The result of reading a cabal configuration file.l cabal-debian<Information required to represent a non-cabal debianization.m cabal-debianMapping 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.n cabal-debianXSpecify epoch numbers for the debian package generated from a cabal package. Example: EpochMapping (PackageName HTTP) 1.o cabal-debian'Supply some info about a cabal package.: cabal-debian Given the [. value read the cabalization and build a new . record. ()*+-,.56789: .()*+-,85679:None[.<=>?@ABCDEFGHIJK.>A@?=DCB<EFGHIJKNone"#7>HPSVWX_L cabal-debian%This data type represents changes to ># state, requested at command line.M cabal-debianThis data type is an abomination. It represent information, provided on command line. Part of such information provides means to create initial > state and is stored in O field. See  newCabalInfo.YOther, much greater part represent changes to already created state. They are stored in P 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 ()[\]^_`abcdLMNOPQRSMNOPL[\]^_`abcdSRQNone=>?PX6s cabal-debian?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.)p cabal-debian:Assemble all the links by package and output one file eachssNone2=?X w cabal-debianTry 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.q cabal-debian2Look for a field and apply a function to its valuex cabal-debian-Look in several places for a debian changelogy cabal-debian-Look in several places for a debian changelogr cabal-debian4Construct 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.s cabal-debian%Read a line from a debian .links filet cabal-debian'Read a line from a debian .install fileu cabal-debian$Read a line from a debian .dirs filez cabal-debianWhere 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.{ cabal-debian Where to look for the data-filesvwxyz{vwxyz{None>||None>С} cabal-debianCreate 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.~ cabal-debianTAdd a debian binary package to the debianization containing a cabal executable file. cabal-debianjAdd a debian binary package to the debianization containing a cabal executable file set up to be a server. cabal-debianlAdd a debian binary package to the debianization containing a cabal executable file set up to be a web site. cabal-debianqAdd a debian binary package to the debianization containing a cabal executable file set up to be a backup script. cabal-debianInstall configuration files to do log rotation. This does not work well with the haskell logging library, so it is no longer called in siteAtoms.v cabal-debianVA configuration file for the logrotate facility, installed via a line in debianFiles.|}~}~|None 1=?@AHSVXa cabal-debian7Build the Debian package name for a given package type. cabal-debianFunction 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. cabal-debianBuild 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"). cabal-debianMap 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?) cabal-debianJMap versions less than ver of Cabal Package pname to Debian package ltname cabal-debian/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 cabal-debianUpdate 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.NonePXu w cabal-debianNaive 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 _ _ = Falsex cabal-debianfDebian packages don't have per binary package build dependencies, so we just gather them all up here.y cabal-debianETake the intersection of all the dependencies on a given package name cabal-debianVCollect the dependencies required to build any packages that have architecture "all".z cabal-debianThe 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.{ cabal-debianThe 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.| cabal-debianTurn 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.} cabal-debianIf 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.~ cabal-debianreturn and of ors of relNone =>?XDz cabal-debiandebianize 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. cabal-debianPass 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. cabal-debian0Do some light IO and call finalizeDebianization. cabal-debian!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 code cabal-debianCompute 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. cabal-debianlReturn the Debian epoch number assigned to the given cabal package - the 1 in version numbers like 1:3.5-2. cabal-debianCompute and return the debian source package name, based on the sourcePackageName if it was specified, and constructed from the cabal name otherwise. cabal-debianTry 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-Uploaders cabal-debian4If l is the empty list return d, otherwise return l. cabal-debian+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. cabal-debianMake 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.) cabal-debianConvert 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.) cabal-debian@Applies a few settings to official packages (unless already set) cabal-debianCFilter out any relations that mention any of the bad package names. cabal-debian<Add the library paragraphs for a particular compiler flavor. cabal-debian^This is the standard value for the Description field of a binary package control file stanza. cabal-debianTMake 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. cabal-debian1Add the normal default values to the rules files.None "#1=?PSX]D cabal-debianRun 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. cabal-debianaPerform whole debianization. You provide your customization, this function does everything else. cabal-debianDepending on the options in atomsC, either validate, describe, or write the generated debianization. cabal-debian%Write the files of the debianization d to ./debian cabal-debian|Return a string describing the debianization - a list of file names and their contents in a somewhat human readable format. cabal-debianDo only the usual maintenance changes when upgrading to a new version and avoid changing anything that is usually manually maintained. cabal-debianWCompare the old and new debianizations, returning a string describing the differences. cabal-debianBMake 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.  None]}/89?NRTUSVWZXY[\]^_`abcdrstuvwxyz{}|~     #$%&'()*+,-./012345=;6789:<>?@ABVWXYZ[\]^_`abcdefgpz}|{~      !"#$%&'()*+-,.56789:<=>?@ABCDEGHvwx|}~w<=>?@ABCDEGHvwxp/89?N{}|~SafeeSafeXk cabal-debianUDo a hard reset of all the files of the repository containing the working directory. cabal-debiansDo a hard reset of all the files of a subdirectory within a git repository. (Does this every throw an exception?) cabal-debianuDetermine whether the repository containing the working directory is in a modified state, if so return the messages. ! " # #$%$&$'()*+,-./012345667899:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuuvwxyyz{|}~op      !"#$%%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL 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[\]^_`aabcdefghijklmnopqrstuvwxyz{|}~op      !"#$%&'()*)+),)-).)/)0)12 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I JbKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Y'cabal-debian-5.1-5ezG7g9SXX8KmBOOXDeKoeDebian.Debianize.PreludeData.Maybe.ExtendedDebian.Debianize.ChangelogDebian.Debianize.InterspersedDebian.Debianize.VersionSplitsDebian.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.4.0.1Distribution.Types.PackageId pkgVersionpkgNamePackageIdentifierDistribution.Types.PackageName mkPackageName unPackageName PackageName 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 recommendsreplacessuggestswithCompilerVersionwithModifiedPATHnewestAvailablenewestAvailableCompilerIdcompilerIdFromDebianVersioncompilerFlavorOptioncompilerPackageNamegetCompilerInfoinputCabalizationbuiltIn 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$fIsBuildableTestSuite$fIsBuildableBuildInfo$fIsBuildableExecutable $fShowRels debianizedebianizeWebsite debianizeWith watchAtomrunDebianizeScriptperformDebianizationperformDebianizationOfWebsiteperformDebianizationWithfinishDebianizationwriteDebianizationdescribeDebianizationcompareDebianizationvalidateDebianizationversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName gitResetHardgitResetSubdir gitUnclean gitIsClean withCleanRepobase GHC.MaybeMaybeNothingJust Data.MaybemaybeisJust isNothing fromMaybe maybeToList listToMaybe catMaybesmapMaybefromJustSplits dropPrefix prettyRangeDistribution.VerbosityintToVerbosityDistribution.VersionfoldVersionRange'betweenVersionsInclusiveremoveLowerBoundremoveUpperBoundinvertVersionRangedifferenceVersionRangessimplifyVersionRangeisSpecificVersion isNoVersion isAnyVersion"Distribution.Types.VersionIntervalinvertVersionIntervalsintersectVersionIntervalsunionVersionIntervalsfromVersionIntervalstoVersionIntervalswithinIntervalsmkVersionIntervalsversionIntervalsasVersionIntervalsVersionIntervalsVersionInterval LowerBound UpperBound NoUpperBoundBoundExclusiveBoundInclusiveBoundDistribution.Types.VersionRange hasLowerBound hasUpperBoundmajorUpperBoundwildcardUpperBound withinRangestripParensVersionRangenormaliseVersionRangehyloVersionRangefoldVersionRangeanaVersionRangeembedVersionRangecataVersionRangeprojectVersionRangemajorBoundVersion withinVersionintersectVersionRangesunionVersionRangesorEarlierVersionearlierVersionorLaterVersion laterVersionnotThisVersion thisVersion noVersion anyVersion VersionRange AnyVersion ThisVersion LaterVersionOrLaterVersionEarlierVersionOrEarlierVersionWildcardVersionMajorBoundVersionUnionVersionRangesIntersectVersionRangesVersionRangeParens VersionRangeF AnyVersionF ThisVersionF LaterVersionFOrLaterVersionFEarlierVersionFOrEarlierVersionFWildcardVersionFMajorBoundVersionFUnionVersionRangesFIntersectVersionRangesFVersionRangeParensFDistribution.Types.Version showVersion alterVersion nullVersionversionNumbers mkVersion'version0 mkVersionVersiondots_package _architecture _essential _description _relationsnewestAvailable' autoreconf hcExecutablehcExecutablePath hcBinPkgName binPkgFilesparsePackageIdentifier_source _maintainer _changedBy _uploaders_dmUploadAllowed _priority_section_standardsVersion _homepage _vcsFields_xFields_binaryPackages_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_packageDescription_debInfo_debianNameMap _epochMap _packageInfolinksfindMapinputCabalInforeadLink readInstallreadDirserverLogrotate'unboxDependencyallBuildDependsmergeCabalDependenciesdocDependenciesbuildDependencies dependencies doBundledfinalizeDebianizationfinalizeDebianization' debianVersion debianEpochfinalizeSourceNamefinalizeMaintainer whenEmptydebianDescriptionBasefinalizeChangelogaddExtraLibDependenciescheckOfficialSettingsfilterRelations librarySpecsdescmakeUtilsPackage finalizeRulesmergeDebianization