Hello community, here is the log from the commit of package ghc-asn1-types for openSUSE:Factory checked in at 2015-10-06 13:24:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-asn1-types (Old) and /work/SRC/openSUSE:Factory/.ghc-asn1-types.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-asn1-types" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-asn1-types/ghc-asn1-types.changes 2015-05-21 08:33:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-asn1-types.new/ghc-asn1-types.changes 2015-10-06 13:24:17.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Sep 27 09:53:36 UTC 2015 - [email protected] + +- update to 0.3.1 + +------------------------------------------------------------------- Old: ---- asn1-types-0.3.0.tar.gz New: ---- asn1-types-0.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-asn1-types.spec ++++++ --- /var/tmp/diff_new_pack.7374YO/_old 2015-10-06 13:24:20.000000000 +0200 +++ /var/tmp/diff_new_pack.7374YO/_new 2015-10-06 13:24:20.000000000 +0200 @@ -15,15 +15,16 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %global pkg_name asn1-types Name: ghc-asn1-types -Version: 0.3.0 +Version: 0.3.1 Release: 0 Summary: ASN.1 types +License: BSD-3-Clause Group: System/Libraries -License: BSD-3-Clause Url: http://hackage.haskell.org/package/%{pkg_name} Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -33,6 +34,7 @@ # Begin cabal-rpm deps: BuildRequires: ghc-bytestring-devel BuildRequires: ghc-hourglass-devel +BuildRequires: ghc-memory-devel # End cabal-rpm deps %description @@ -55,30 +57,23 @@ %prep %setup -q -n %{pkg_name}-%{version} - %build %ghc_lib_build - %install %ghc_lib_install - %post devel %ghc_pkg_recache - %postun devel %ghc_pkg_recache - %files -f %{name}.files %defattr(-,root,root,-) %doc LICENSE - %files devel -f %{name}-devel.files %defattr(-,root,root,-) - %changelog ++++++ asn1-types-0.3.0.tar.gz -> asn1-types-0.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asn1-types-0.3.0/Data/ASN1/Pretty.hs new/asn1-types-0.3.1/Data/ASN1/Pretty.hs --- old/asn1-types-0.3.0/Data/ASN1/Pretty.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/asn1-types-0.3.1/Data/ASN1/Pretty.hs 2015-09-21 15:04:20.000000000 +0200 @@ -0,0 +1,78 @@ +-- | +-- Module : Data.ASN1.Pretty +-- License : BSD-style +-- Maintainer : Vincent Hanquez <[email protected]> +-- Stability : experimental +-- Portability : unknown +-- +module Data.ASN1.Pretty + ( pretty + , PrettyType(..) + ) where + +import Data.ASN1.Types +import Data.ASN1.BitArray +import Data.ByteArray.Encoding (convertToBase, Base(..)) +import Data.ByteString (ByteString) +import Numeric (showHex) + +data PrettyType = Multiline Int -- Offset where to start + | SingleLine + deriving (Show,Eq) + +-- | Pretty Print a list of ASN.1 element +pretty :: PrettyType -- ^ indent level in space character + -> [ASN1] -- ^ stream of ASN1 + -> String +pretty (Multiline at) = prettyPrint at + where + indent n = replicate n ' ' + + prettyPrint _ [] = "" + prettyPrint n (x@(Start _) : xs) = indent n ++ p id x ++ prettyPrint (n+1) xs + prettyPrint n (x@(End _) : xs) = indent (n-1) ++ p id x ++ prettyPrint (n-1) xs + prettyPrint n (x : xs) = indent n ++ p id x ++ prettyPrint n xs + +pretty SingleLine = prettyPrint + where + prettyPrint [] = "" + prettyPrint (x@(Start _) : xs) = p id x ++ "," ++ prettyPrint xs + prettyPrint (x@(End _) : xs) = p id x ++ "," ++ prettyPrint xs + prettyPrint (x : xs) = p id x ++ "," ++ prettyPrint xs + +p :: ([Char] -> t) -> ASN1 -> t +p put (Boolean b) = put ("bool: " ++ show b) +p put (IntVal i) = put ("int: " ++ showHex i "") +p put (BitString bits) = put ("bitstring: " ++ (hexdump $ bitArrayGetData bits)) +p put (OctetString bs) = put ("octetstring: " ++ hexdump bs) +p put (Null) = put "null" +p put (OID is) = put ("OID: " ++ show is) +p put (Real d) = put ("real: " ++ show d) +p put (Enumerated _) = put "enum" +p put (Start Sequence) = put "{" +p put (End Sequence) = put "}" +p put (Start Set) = put "[" +p put (End Set) = put "]" +p put (Start (Container x y)) = put ("< " ++ show x ++ " " ++ show y) +p put (End (Container x y)) = put ("> " ++ show x ++ " " ++ show y) +p put (ASN1String cs) = putCS put cs +p put (ASN1Time TimeUTC time tz) = put ("utctime: " ++ show time ++ " " ++ show tz) +p put (ASN1Time TimeGeneralized time tz) = put ("generalizedtime: " ++ show time ++ " " ++ show tz) +p put (Other tc tn x) = put ("other(" ++ show tc ++ "," ++ show tn ++ "," ++ show x ++ ")") + +putCS :: ([Char] -> t) -> ASN1CharacterString -> t +putCS put (ASN1CharacterString UTF8 t) = put ("utf8string:" ++ show t) +putCS put (ASN1CharacterString Numeric bs) = put ("numericstring:" ++ hexdump bs) +putCS put (ASN1CharacterString Printable t) = put ("printablestring: " ++ show t) +putCS put (ASN1CharacterString T61 bs) = put ("t61string:" ++ show bs) +putCS put (ASN1CharacterString VideoTex bs) = put ("videotexstring:" ++ hexdump bs) +putCS put (ASN1CharacterString IA5 bs) = put ("ia5string:" ++ show bs) +putCS put (ASN1CharacterString Graphic bs) = put ("graphicstring:" ++ hexdump bs) +putCS put (ASN1CharacterString Visible bs) = put ("visiblestring:" ++ hexdump bs) +putCS put (ASN1CharacterString General bs) = put ("generalstring:" ++ hexdump bs) +putCS put (ASN1CharacterString UTF32 t) = put ("universalstring:" ++ show t) +putCS put (ASN1CharacterString Character bs) = put ("characterstring:" ++ hexdump bs) +putCS put (ASN1CharacterString BMP t) = put ("bmpstring: " ++ show t) + +hexdump :: ByteString -> String +hexdump bs = show (convertToBase Base16 bs :: ByteString) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/asn1-types-0.3.0/asn1-types.cabal new/asn1-types-0.3.1/asn1-types.cabal --- old/asn1-types-0.3.0/asn1-types.cabal 2014-10-19 11:29:22.000000000 +0200 +++ new/asn1-types-0.3.1/asn1-types.cabal 2015-09-21 15:04:20.000000000 +0200 @@ -1,5 +1,5 @@ Name: asn1-types -Version: 0.3.0 +Version: 0.3.1 Description: ASN.1 standard types License: BSD3 License-file: LICENSE @@ -16,10 +16,12 @@ Library Build-Depends: base >= 3 && < 5 , bytestring + , memory , hourglass Exposed-modules: Data.ASN1.BitArray Data.ASN1.OID + Data.ASN1.Pretty Data.ASN1.Types Data.ASN1.Types.String Data.ASN1.Types.Lowlevel
