hH      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu v w x y z { | } ~                                   ! " # $ % & ' ( ) * + , - . / 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 qrstuvwxyz{|}~None*2468 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. 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.    None*+24None+246 Describes 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) ascending version number order. `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.         Safe-Inferred$This function belongs in Cabal, see  2http://hackage.haskell.org/trac/hackage/ticket/935.NoneHM$Memoized version of newestAvailable'FLook up the newest version of a deb available in the given changeroot.kGeneral function to build a command line option that reads most of the possible values for CompilerFlavor.  None*MkFind out what version, if any, of a cabal library is built into the newest version of haskell compiler hc in environment root. For GHC this is done by looking at what virtual packages debian package provides. I have modified the ghcjs packaging to generate the required virtual packages in the Provides line. For other compilers it maybe be unimplemented.bOk, lets see if we can infer the built in packages from the Provides field returned by apt-cache. !" !" !" !"None234M%>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.*PCompute the new file contents from the old. If f returns Nothing do not write.-Create a map from pathname to the names of the packages that contains that pathname using the contents of the debian package info directory varlibdpkginfo..:Given a path, return the name of the package that owns it.4EFrom Darcs.Utils - set the working directory and run an IO operation.5'Get directory contents minus dot files.9=If the current value of getL x is Nothing, replace it with f.> Version of ? that first clamps its argument to the acceptable range (0-3).?YSet a lens value. (This is a version of Data.Lens.Lazy.~= that returns () instead of b.)@Set 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 isJustAWModify a value. (This is a version of Data.Lens.Lazy.%= that returns () instead of a.)BInsert an element into a (Set b)CInsert an element into a  (Map b c)DInsert an element into a (Map b (Set c))*#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH&#$%&'()*+,-./0123456789:;<=>?@ABCDEFGH&$#%&'()*+,-./0123456789:;<=>?@ABCDEFGH*#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHNone+24P6The architectures for which a binary deb can be built.Q"The list of suitable architecturesR-The package can be built for any architectureS(The package is architecture independenctjThe 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.k"Assumes debian-policy is installedsTTurn the uploaders field of a cabal package into a list of RFC2822 NameAddr values.t2Parse a string containing a single NameAddr value.2IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst,IJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst,_`abcdegfhij]^klZ\[mTYXWVUnPSRQoMONpILKJstqr"ILKJMONPSRQTYXWVUZ\[]^_`abcdefghijklmnopqrst None+v&Package interrelationship information.wLThis is used to construct the value for DEB_CABAL_PACKAGE in the rules filexVThe source package of a haskell library (add prefix haskell- to source package name.)y/The source package (not a binary deb actually.)zcA package that holds the package's data files and any executables not assigned to other packages.{TA package related to a particular executable, perhaps but not necessarily a server.|The libghc-foo-doc package.}The libghc-foo-prof package.~The libghc-foo-dev package.This 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.101uvwxyz{|}~uvwxyz{|}~v~}|{zyxwuu v~}|{zyxw  None+:Field will be copied to the upload control (.changes) file8Field will be copied to the source packgae control files8Field will be copied to the binary packgae control filesvUser 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-Version Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Homepage Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-VCS-fields Bhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7MThe binary debs. This should be a map, but we may need to preserve the order4##  None+The 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.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 job+A redundant data type, too lazy to expunge.nThis record supplies information about the task we want done - debianization, validataion, help message, etc.=Run with progress messages at the given level of verboseness.YDon't write any files or create any directories, just explain what would have been done.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.)What to do - Usage, Debianize or Substvar%The output of the debootstrap command0An environment with build dependencies installed,An environment where we have built a package(Create a directory in the binary packageGInstall a cabal executable into the binary package at an exact location2Install a cabal executable into the binary package3Create a file with the given text at the given path5DHInstallTo somewhere relative to DataDir (see above)AInstall a build file into the binary package at an exact location,Install a build file into the binary package,Create a symbolic link in the binary packageBits and pieces of information about the mapping from cabal package names and versions to debian package names and versions. In essence, an  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.(Do not produce a libghc-foo-doc package.)Do not produce a libghc-foo-prof package.(Don't link the documentation for hoogle.If present, don't generate the << dependency when we see a cabal equals dependency. (The implementation of this was somehow lost.)The 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 FilePath 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 "/".HInformation regarding mode of operation - verbosity, dry-run, usage, etcMapping 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.'The parsed contents of the control fileName 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.PSpecify the revision string to use when converting the cabal version to debian.Specify 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.HValue 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.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. Write debiansourceformatWrite debian/watchCPut this text into a file with the given name in the debianization.pThe header of the debian/rules file. The remainder is assembled from DebRulesFragment values in the atom list.A Fragment of debian/rulesA warning to be reported laterName of a package that will get left-over data files and executables. If there are more than one, each package will get those files.GThe changelog, first entry contains the source package name and versionxEach 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.XSpecify epoch numbers for the debian package generated from a cabal package. Example: EpochMapping (PackageName HTTP) 1. 'Supply some info about a cabal package. 6The debhelper compatibility level, from debian/compat. Copyright information 'License information Cabal License value CThe contents of the file specified in the cabal license-file: fieldPHave Apache configure a site using PACKAGE, DOMAIN, LOGDIR, and APACHECONFIGFILE6Add a stanza of a logrotate file to the binary package,Script to run after install, should contain  DEBHELPER line before exit 0+Script to run after remove, should contain  DEBHELPER line before exit 0-Script to run before install, should contain  DEBHELPER line before exit 0,Script to run before remove, should contain  DEBHELPER line before exit 00Set the Architecture field of the source package.Set the Architecture field of a binary package,Set the Priority field of the source package*Set the Priority field of a binary package+Set the Section field of the source package)Set the Section field of a binary package(Add an init.d file to the binary package2Create a binary package to hold a cabal executableCLike DHExecutable, but configure the executable as a server process7Like DHServer, but configure the server as a web server2Configure the executable to do incremental backups Limited 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.!1The result of reading a cabal configuration file."8Which compilers should we generate library packages for?#iLook for --buildenvdir in the command line arguments to get the changeroot path, use "/" if not present.'-Set how much progress messages get generated.(KDon't write anything, just output a description of what would have happened)cMake sure the version number and package names of the supplied and generated debianizations match.*lDebianize, SubstVars, or Usage. I'm no longer sure what SubstVars does, but someone may still be using it.+FObsolete record containing verbosity, dryRun, validate, and debAction.,Unused-<The build directory. This can be set by an argument to the Setup script. When Setup is run manually it is just dist, when it is run by dpkg-buildpackage4 the compiler name is appended, so it is typically dist-ghcO. Cabal-debian needs the correct value of buildDir to find the build results.0>Map from cabal Extra-Lib names to debian binary package names.1?Map from cabal Build-Tool names to debian binary package names.2:Cabal flag assignments to use when loading the cabal file.3#The result of loading a .cabal file4Map from cabal version number ranges to debian package names. This is a result of the fact that only one version of a debian package can be installed at a given time, while multiple versions of a cabal package can.57Map of Debian epoch numbers assigned to cabal packages.6+Create a package to hold a cabal executable7Create a package for a server8Create a package for a website9*Create a package for a timed backup script:Create an apache configuration file with the given (domain, logdir, filetext). This is called when expanding the result of the website lens above.;List if packages that should be omitted from any dependency list - e.g. a profiling package missing due to use of noProfilingPackage lens elsewhere.<LOverride the package name used to hold left over data files and executables.=GOverride the debian source package name constructed from the cabal name>URevision string used in constructing the debian verison number from the cabal version?SExact debian version number, overrides the version generated from the cabal version@0No longer sure what the purpose of this lens is.A|Set this to filter any less-than dependencies out of the generated debian dependencies. (Not sure if this is implemented.)B&Set this to omit the prof library deb.C.Set this to omit the hoogle documentation linkD%Set this to omit the doc library deb.E-The copyright information from the cabal fileF+The license information from the cabal fileG0The value in the cabal file's license-file fieldH5The architectures supported by this source package - Any, All), or some list of specific architectures.IExtra install dependencies for the devel library. Redundant with depends, but kept for backwards compatibility. Also, I think maybe this is or was needed because it can be set before the exact name of the library package is known.JThe beginning of the rules fileK&Additional fragments of the rules fileLMap of debian/postinst scriptsMMap of  debian/postrm scriptsNMap of debian/preinst scriptsOMap of  debian/prerm scriptsPThe  debian/compat7 file, contains the minimum compatible version of the  debhelperW package. If not given the version number of the installed debhelper package is used.QThe debian/source/format file.Rthe  debian/watch fileSthe debian/changelog fileTHComment entries for the latest changelog entry (DebLogComments [[Text]])UThe debian/control9 file. Many of the following lenses access parts of the SourceDebDescription.V6Add a stanza to the binary package's logrotate script.W"Access the set of new style atoms.` Create an etcTinit.d file in the package FIXME: change signature to BinPkgName -> Lens Atoms TextaCreate a file in the debianization. This is used to implement the file lens above. FIXME: change signature to BinPkgName -> Lens Atoms (Set (FilePath, Text))      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abK6      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab Nonecdefghij cdefghij dgfecjihcdefghij None *246=HKMk7Build the Debian package name for a given package type.lFunction 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.mBuild 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").oMap 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?)pJMap versions less than ver of Cabal Package pname to Debian package ltname    klmn opklmnopklmnop   klmn opNoneqySome details about the debian repository - special cases for how some cabal packages are mapped to debian package names.rThese are the instances of debian names changing that I know about. I know they really shouldn't be hard coded. Send a patch. Note that this inherits the lack of type safety of the mkPkgName function. (FIXME: Use combinators to construct this.)qrqrqrqrNone+ Not exported - Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-PackagesLens onto one of several v< values of which we have specific knowledge how to package.t:Lens into the description field of a BinaryDebDescription.u Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Essentialv Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10n relations :: BinPkgName -> Lens Atoms B.PackageRelations relations b = B.relations . binaryDebDescription b-The Depends: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10w0The Recommends: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10x.The Suggests: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10y1The Pre-Depends: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10z,The Breaks: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10{/The Conflicts: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10|.The Provides: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10}.The Replaces: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10~1THe Built-Using: relations for each binary deb - Ehttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.6.10sMaintainer field. Overrides any value found in the cabal file, or in the DEBIANMAINTAINER environment variable. Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Maintainer/The architectures supported by a binary packageThe source package priority - Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-PriorityQMap of the binary package priorities (FIXME: redundant with BinaryDebDescription)*The source package's section assignment - Ihttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-SectionVMap of the binary deb section assignments (FIXME: redundant with BinaryDebDescription) 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-Changed-By Khttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Uploaders Obsolete - Shttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-DM-Upload-AllowedThe Standards-Version field of the debian/control file - Shttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Standards-Version Jhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-HomepageVersion control system field - Lhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-VCS-fieldsUser defined fields - Bhttp://www.debian.org/doc/debian-policy/ch-controlfields.html#s5.7 Phttp://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps Phttp://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps Phttp://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps Phttp://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps  stuvwxyz{|}~W'()*+,-0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVXYZ[\]^_`astuvwxyz{|}~W'(*2315;04=>?EFGHPQSTJKBCD<-RA6789:ILMNO`stuvwxyz{|}~XYZ[\]^_V+),a@U  stuvwxyz{|}~NoneCreate 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.+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.iA configuration file for the logrotate facility, installed via a line in debianFiles. FIXME - use Atoms6Build a suitable value for the head of the rules file.None24EM?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 each !"#$%&'() !"#$%&'()None+24M BTry to input a file and if successful add it to the debianization.*2Look for a field and apply a function to its value+4Construct 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/'Run the package's configuration script.+Try to compute a string for the the debian  Maintainer:d field using, in this order 1. the maintainer explicitly specified using "Debian.Debianize.Monad.maintainer" 2. the maintainer field of the cabal package, 3. the value returned by getDebianMaintainer, which looks in several environment variables, 4. the signature from the latest entry in debian/changelog, 5. the Debian Haskell Group, /pkg-haskell-maintainers@lists.alioth.debian.orgCompute the Cabal data directory for a Linux install 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.012*3456+,-./012*3456+,-./None2EMqExpand the contents of the .substvars file for a library package. Each cabal package corresponds to a directory  name- version , either in usr lib or in usrlibhaskell-packagesghc/lib. In that directory is a compiler subdirectory such as ghc-6.8.2. In the ghc subdirectory is one or two library files of the form libHS name- version .a and libHS name- versiong_p.a. We can determine the debian package names by running dpkg -S on these names, or examining the varlibdpkgxinfo/*.list files. From these we can determine the source package name, and from that the documentation package name.7fDebian packages don't have per binary package build dependencies, so we just gather them all up here.8oGiven a control file and a DebType, look for the binary deb with the corresponding suffix and return its name.9:;<=BThe type of deb we want to write substvars for - Dev, Prof, or Doc>?@ABC78D 9=<;:>?@ABC78DNonemRead a value out of the CABALDEBIAN environment variable which is the result of applying show to a [String].Insert a value for CABALDEBIAN into the environment that the withEnvironment* functions above will find and use. E.g. putEnvironmentFlags ["--dry-run", "--validate"] (debianize defaultFlags) Options that modify other atoms.E,Process a --executable command line argument FEGHIJ FEGHIJNoneEMKIn cabal a self dependency probably means the library is needed while building the executables. In debian it would mean that the package needs an earlier version of itself to build, so we use this to filter such dependencies out.LfDebian packages don't have per binary package build dependencies, so we just gather them all up here.MThe documentation dependencies for a package include the documentation package for any libraries which are build dependencies, so we have access to all the cross references.NThe 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.OTurn 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.PIf 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.Qreturn and of ors of relRSTUVWXYZ[\]K^LMN_`abOPcdeQfRWUSXVTY]\[ZK^LMN_`abOPcdeQfNone24M #Given an Atoms value, get any additional configuration information from the environment, read the cabal package description and possibly the debian/changelog file, then generate and return the new debianization (along with the data directory computed from the cabal package description.)0Do some light IO and call finalizeDebianization.g!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 codehCompute the final values of the BinaryDebDescription record description fields from the cabal descriptions and the values that have already been set.iCombine various bits of information to produce the debian version which will be used for the debian package. If the override parameter is provided this exact version will be used, but an error will be thrown if that version is unusably old - i.e. older than the cabal version of the package. Otherwise, the cabal version is combined with the given epoch number and revision string to create a version.jlReturn the Debian epoch number assigned to the given cabal package - the 1 in version numbers like 1:3.5-2.kCompute and return the debian source package name, based on the sourcePackageName if it was specified, and constructed from the cabal name otherwise.lMake 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.)mConvert 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.)n<Add the library paragraphs for a particular compiler flavor.oTMake 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.pqrstghuijkvwlmxyzn{|o}~ptsrqghuijkvwlmxyzn{|o}~ Safe-InferredMPretty print a list of hunks.'Pretty print a hunk of adjacent changes9Pretty print a single change (e.g. a line of a text file) Safe-InferredDo a grouped diff and then turn it into a list of hunks, where each hunk is a grouped diff with at most N elements of common context around each one.Group the elements whose adjacent pairs satisfy the predicate. Differs from groupBy because the predicate does not have to define a total ordering.None*24EMRun 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.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.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.None%-.4?@ABCDIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrst      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijopqstuvwxyz{|}~'qdgefcjhiop4%-.?@ABCD !"#$%&'(()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxxyz{|}~                                                                                              ! " # $ % & ' ( ) * + , - . / 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 { | } ~    '                                               egbW !"#$%&'()*+,-./0123456789$:;)<=>?'@ABCDEFGHIJKLMNOPQ)<Rcabal-debian-4.17.5Debian.Debianize.InterspersedDebian.Debianize.ChangelogDebian.Debianize.VersionSplitsDistribution.Version.Invert Debian.GHCDebian.Debianize.BundledDebian.Debianize.Prelude Debian.Policy+Debian.Debianize.Types.BinaryDebDescription+Debian.Debianize.Types.SourceDebDescriptionDebian.Debianize.Types.AtomsDebian.Debianize.MonadDebian.Debianize.DebianNameDebian.Debianize.DetailsDebian.Debianize.TypesDebian.Debianize.GoodiesDebian.Debianize.FilesDebian.Debianize.InputDebian.Debianize.SubstVarsDebian.Debianize.Options"Debian.Debianize.BuildDependenciesDebian.Debianize.FinalizeData.Algorithm.Diff.PrettyData.Algorithm.Diff.ContextDebian.Debianize.OutputDebian.OrphansDebian.Debianize Interspersedleftmostpairs foldTriples foldInverted foldArounds foldBetweens filterEntriesdropFutureEntriesfindChangelogEntrymergeChangelogEntries VersionSplitsDebBase unDebBase makePackage insertSplitpackageRangesFromVersionSplitsdebianFromCabalcabalFromDebian'cabalFromDebiandoSplitsinvertVersionRangeinvertVersionIntervalswithCompilerVersionnewestAvailablenewestAvailableCompilerIdcompilerIdFromDebianVersioncompilerFlavorOptionbuiltInaptCacheShowPkgaptCacheProvidesaptCacheDependsaptCacheConflicts aptVersionsDebMapcurry3buildDebVersionMap!trim strictReadF replaceFile modifyFilediffFileremoveIfExists dpkgFileMap debOfFilecond readFile' readFileMaybeshowDeps showDeps'withCurrentDirectorygetDirectoryContents' setMapMaybezipMaps foldEmptymaybeLindent maybeReadread'modifyMintToVerbosity'~=~?=%=+=++=+++= listElemLens maybeLens fromEmpty fromSingletonAreaNonFreeContribMainSection AreaSection MainSectionPackageArchitecturesNamesAnyAllPackagePriorityExtraOptionalStandard ImportantRequired SourceFormatQuilt3Native3StandardsVersiondatabaseDirectoryapacheLogDirectoryapacheErrorLogapacheAccessLogserverLogDirectory serverAppLogserverAccessLogappLogBaseNameerrorLogBaseNameaccessLogBaseNamedebianPackageVersiongetDebhelperCompatLevelgetDebianStandardsVersionparseStandardsVersionreadSourceFormat readPriorityparsePackageArchitectures readSectiongetDebianMaintainerhaskellMaintainerparseUploadersparseMaintainerPackageRelations PackageTypeCabal HaskellSourceSource UtilitiesExec Documentation Profiling DevelopmentBinaryDebDescriptionnewBinaryDebDescriptionnewPackageRelationspackage packageType architecture binarySectionbinaryPriority essential description relationsdepends recommendssuggests preDependsbreaks conflictsprovidesreplaces builtUsing XFieldDestCSBXFieldVersionControlSpecVCSSvnVCSMtnVCSHgVCSGitVCSDarcsVCSCvsVCSBzrVCSArch VCSBrowserSourceDebDescriptionnewSourceDebDescriptionnewSourceDebDescription'source maintainer changedBy uploadersdmUploadAllowedprioritysectionstandardsVersionhomepage vcsFieldsxFields buildDependsbuildConflictsbuildDependsIndepbuildConflictsIndepbinaryPackages InstallFileexecName sourceDirdestDirdestNameServerhostnameport headerMessageretry serverFlags installFileSitedomain serverAdminserver PackageInfo cabalNamedevDebprofDebdocDebDebTypeDocProfDev DebActionSubstVar DebianizeUsageFlags verbosity_dryRun_ validate_ debAction_EnvSetcleanOSdependOSbuildOSAtoms'Atom InstallDirInstallCabalExecToInstallCabalExecFile InstallData InstallToInstallLinkAtomsnoDocumentationLibrary_noProfilingLibrary_ noHoogle_ omitLTDeps_ buildDir_ buildEnv_flags_debianNameMap_control_sourcePackageName_ revision_ debVersion_maintainerOld_cabalFlagAssignments_ sourceFormat_watch_intermediateFiles_ rulesHead_rulesFragments_warning_utilsPackageNameBase_ changelog_ comments_missingDependencies_ extraLibMap_execMap_ epochMap_ packageInfo_compat_ copyright_license_ licenseFile_ apacheSite_logrotateStanza_ postInst_postRm_preInst_preRm_sourceArchitecture_binaryArchitectures_sourcePriority_binaryPriorities_sourceSection_binarySections_atomSet_ installInit_ executable_ serverInfo_website_backups_ extraDevDeps_packageDescription_compilerFlavors_newAtoms makeAtoms defaultFlags showAtoms verbositydryRunvalidate debActionflagswarningbuildDirbuildEnv setBuildEnv extraLibMapexecMapcabalFlagAssignmentspackageDescription debianNameMapepochMap executable serverInfowebsitebackups apacheSitemissingDependenciesutilsPackageNameBasesourcePackageNamerevision debVersion packageInfo omitLTDepsnoProfilingLibrarynoHooglenoDocumentationLibrary copyrightlicense licenseFilesourceArchitectures extraDevDeps rulesHeadrulesFragmentspostInstpostRmpreInstpreRmcompat sourceFormatwatch changelogcommentscontrollogrotateStanzaatomSetlinkinstall installTo installDatafileinstallCabalExecinstallCabalExecTo installDir installInitintermediateFilescompilerFlavorsDebMDebTexecDebTevalDebTrunDebTexecDebMevalDebMrunDebM debianNamedebianNameBase mkPkgName mkPkgName'mapCabal splitCabaldebianDefaultAtomsdebianVersionSplitsdebianDescriptionbinaryArchitecturessourcePriority sourceSectiontightDependencyFixup doExecutabledoServer doWebsite doBackupsdescribeoldClckwrksSiteFlagsoldClckwrksServerFlags watchAtom siteAtoms serverAtoms backupAtoms execAtoms makeRulesHeaddebianizationFileMapinputDebianizationinputDebianizationFileinputChangeLoginputCabalizationinputCabalization'inputMaintainerdataDir substvars compileArgscompileEnvironmentArgscompileCommandlineArgswithEnvironmentArgsputEnvironmentArgsoptionsdebianBuildDepsdebianBuildDepsIndep debianizationfinalizeDebianization' prettyDiff prettyHunk prettyChange contextDiffgroupsrunDebianizeScriptdoDebianizeActionwriteDebianizationdescribeDebianizationcompareDebianizationvalidateDebianizationSplits_splits_test1_test2$fInterspersedSplitsDouble[] dropPrefix $fPrettyPP $fPrettyPP0 $fPrettyPP1 $fPrettyPP2 $fPrettyPP3$fOrdPackageDescription$fOrdExecutable oldestPackagesplits)$fInterspersedVersionSplitsDebBaseVersion$fShowVersionSplitsnewestAvailable'$fMemoizableCompilerFlavornewestAvailableCompilerdebName$fMemoizableBinPkgNamebuiltIn' takeBetweenCabal-1.18.1.3Distribution.VerbosityintToVerbosityremoveFileIfExistsremoveDirectoryIfExists $fPrettyPP4_package _architecture _essential _description _relations_depends _recommends _suggests _preDepends_breaks _conflicts _provides _replaces _builtUsing _packageType_binarySection_binaryPriority_source _maintainer _changedBy _uploaders_dmUploadAllowed _priority_section_standardsVersion _homepage _vcsFields_xFields_binaryPackages _buildDepends_buildConflicts_buildDependsIndep_buildConflictsIndep Dependency_ ExtraLibsPkgConfigDepends BuildTools BuildDependsdebianBaseNamebinaryDebDescriptiondebianDescriptionBaseserverLogrotate' showCommand translate fileAtoms fileAtoms'linksFilesTsourceFormatFiles watchFile intermediatesinstallsdirsinit logrotate postinstFiles postrmFiles preinstFiles prermFilesrules controlFile relFieldsdepFieldfindMap inputAtomsreadLink readInstallreadDir autoreconfinputSourceDebDescriptionparseSourceDebDescriptionparseBinaryDebDescription stripFieldrelsyesinputAtomsFromDirectoryallBuildDependsdebNameFromType substvars'libPaths packageInfo'unboxDependencydebDepscabalDependencies filterMissingexecutableOptionanyreladdDep parseDepsflagListselfDependencydocDependenciesbuildDependencies dependencies doBundled canonicalRelsRel'unRelOrunOrAndunAndadaptaptFileanyrel'debianVersion'debianVersion''convert'finalizeDebianizationfinalizeDescriptions debianVersion debianEpochfinalizeSourceNamefinalizeChangelogaddExtraLibDependencies librarySpecsmakeUtilsPackagefinalizeDescriptionfinalizeMaintainerfinalizeControl putBuildDepscabalExecBinaryPackagebinaryPackageRelationsdocSpecsParagraph librarySpec expandAtoms